<!--- 
	  
  Copyright (c) 2006, Chris Scott, Matt Woodward, Adam Wayne Lehman, Dave Ross
  All rights reserved.
	
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  $Id: Category.cfc 83 2006-10-14 04:02:07Z Chris.Scott.One $

--->

<cfcomponent displayname="Category"
	output="false" hint="A bean which models the Category form.">

<!--- This bean was generated by the Rooibos Generator with the following template:
Bean Name: Category
Path to Bean: net.lightblog.component.category.Category
Extends: 
Call super.init(): false
Create cfproperties: false
Bean Template:
	categoryID Numeric 
	category String 
	numPosts Numeric 
Create getMemento method: false
Create setMemento method: false
Create setStepInstance method: false
Create validate method: false
Create validate interior: false
Date Format: MM/DD/YYYY
--->

	<!---
	PROPERTIES
	--->
	<cfset variables.instance = StructNew() />

	<!---
	INITIALIZATION / CONFIGURATION
	--->
	<cffunction name="init" access="public" returntype="net.lightblog.component.category.Category" output="false">
		<cfargument name="categoryID" type="Numeric" required="false" default="0" />
		<cfargument name="category" type="String" required="false" default="" />
		<cfargument name="numPosts" type="Numeric" required="false" default="0" />

		<!--- run setters --->
		<cfset setCategoryID(arguments.categoryID) />
		<cfset setCategory(arguments.category) />
		<cfset setNumPosts(arguments.numPosts) />

		<cfreturn this />
 	</cffunction>

	<!---
	ACCESSORS
	--->
	<cffunction name="setCategoryID" access="public" returntype="void" output="false">
		<cfargument name="categoryID" type="Numeric" required="true" />
		<cfset variables.instance.categoryID = arguments.categoryID />
	</cffunction>
	<cffunction name="getCategoryID" access="public" returntype="Numeric" output="false">
		<cfreturn variables.instance.categoryID />
	</cffunction>

	<cffunction name="setCategory" access="public" returntype="void" output="false">
		<cfargument name="category" type="String" required="true" />
		<cfset variables.instance.category = arguments.category />
	</cffunction>
	<cffunction name="getCategory" access="public" returntype="String" output="false">
		<cfreturn variables.instance.category />
	</cffunction>

	<cffunction name="setNumPosts" access="public" returntype="void" output="false">
		<cfargument name="numPosts" type="Numeric" required="true" />
		<cfset variables.instance.numPosts = arguments.numPosts />
	</cffunction>
	<cffunction name="getNumPosts" access="public" returntype="Numeric" output="false">
		<cfreturn variables.instance.numPosts />
	</cffunction>

</cfcomponent>